package com.tjw.ec.upms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tjw.ec.common.core.util.PageUtils;
import com.tjw.ec.common.core.util.Query;
import com.tjw.ec.upms.api.entity.ModuleEntity;
import com.tjw.ec.upms.dao.ModuleDao;
import com.tjw.ec.upms.service.ModuleService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 系统模块表
 *
 * @author T-junwen
 * @email t-junwen@foxmail.com
 * @date 2019-07-27 16:43:32
 */
@Service("moduleService")
public class ModuleServiceImpl extends ServiceImpl<ModuleDao, ModuleEntity> implements ModuleService {

    @Override
    public PageUtils<ModuleEntity> queryPage(Map<String, Object> params) {

        IPage<ModuleEntity> page = new Query<ModuleEntity>(params).getPage();

        QueryWrapper<ModuleEntity> queryWrapper = new QueryWrapper<>();

        IPage<ModuleEntity> data = baseMapper.selectPage(
                page,
                queryWrapper
        );

        return new PageUtils(data);
    }

}
